﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using System.Windows.Shapes;
using System.Windows.Media;
using Microsoft.Phone.Maps.Controls;
using Windows.Devices.Geolocation;
using System.Device.Location;

namespace Geo_Meet
{
    public partial class Interest_groups : PhoneApplicationPage
    {
        public Interest_groups()
        {
            InitializeComponent();
            listOptions();
        }

        private void listOptions()
        {
            RadioButton options = new RadioButton();

        }


        private void Radiobutton_Checked(object sender, RoutedEventArgs e)
        {
            Rectangle interestPoints = new Rectangle();
            interestPoints.Fill = new SolidColorBrush(Colors.Blue);
            interestPoints.Height = 50;
            interestPoints.Width = 50;

            Map interestMap = new Map();
            //displaygroup(interestMap);

        }
        //public async void displaygroup(Map interestMap)
        //{
        //    Geolocator geolocator = new Geolocator();
        //    geolocator.DesiredAccuracyInMeters = 50;

        //    try
        //    {
        //        Geoposition geoposition = await geolocator.GetGeopositionAsync();


        //        interestMap.Center = new GeoCoordinate(geoposition.Coordinate.Latitude, geoposition.Coordinate.Longitude);
        //        interestMap.ZoomLevel = 10;

        //        //userLocation.GeoCoordinate = new GeoCoordinate(geoposition.Coordinate.Latitude, geoposition.Coordinate.Longitude);

        //        MapLayer userlocationLayer = new MapLayer();
        //        //find this interest group and add its locations to this observable
        //        userlocationLayer.Add(userLocation);
        //        interestMap.Layers.Add(userlocationLayer);
        //    }
        //}
    }
}